const state = {
    clues: {},
    cluesPress: [],
    allCluesPress: [],
    clueImageryIndex: 0,
    collectBlueFox: false,
    blueFoxLockShow: false,
    blueFoxCaseShow: false,
    blueFoxCaseIcon: {}
}
const getters = {
    //获取所有线索
    getClues(state) {
        return state.clues
    },
    //是否显示蓝狐狸奖励页面
    getBlueFoxLockShow(state) {
        return state.blueFoxLockShow
    },
    //获取当前激活的线索
    getCluesPress(state) {
        return state.cluesPress
    },
    //获取所有激活的线索
    getAllCluesPress(state) {
        return state.allCluesPress
    },
    //获取激活的角色
    getClueImageryIndex(state) {
        return state.clueImageryIndex
    },
    //是否收集过蓝狐狸
    getCollectBlueFox(state) {
        return state.collectBlueFox
    },
    //蓝狐狸百宝箱是否显示
    getBlueFoxCaseShow(state) {
        return state.blueFoxCaseShow
    },
    //激活百宝箱的卡牌
    getBlueFoxCaseIcon(state) {
        return state.blueFoxCaseIcon
    }
};
const mutations = {
    //初始化蓝狐狸线索
    setClues(state, param) {
        state.clues = param.clues
        state.collectBlueFox = param.collected
    },
    //激活蓝狐狸线索
    setCluesPress(state, param) {
        state.cluesPress = param
    },
    //新增激活的线索
    setAllCluesPress(state, param) {
        if (state.allCluesPress.indexOf(param) < 0) {
            state.allCluesPress.push(param)
        }
    },
    setClueImageryIndex(state, param) {
        state.clueImageryIndex = param
    },
    //设置是否收集蓝狐狸
    setCollectBlueFox(state) {
        state.collectBlueFox = true
    },
    //设置蓝狐狸奖励是否显示
    setBlueFoxLockShow(state, param) {
        state.blueFoxLockShow = param
    },
    //设置蓝狐狸百宝箱是否显示
    setBlueFoxCaseShow(state, param) {
        state.blueFoxCaseShow = param
    },
    //初始化蓝狐狸百宝箱卡牌
    setBlueFoxCaseIcon(state, param) {
        state.blueFoxCaseIcon = param
        state.blueFoxCaseShow = true
    }
};
const actions = {
    setClues({ commit }, param) {
        commit("setClues", param)
    },
    setCluesPress({ commit }, param) {
        commit("setCluesPress", param)
    },
    setAllCluesPress({ commit }, param) {
        commit("setAllCluesPress", param)
    },
    setClueImageryIndex({ commit }, param) {
        commit("setClueImageryIndex", param)
    },
    setCollectBlueFox({ commit }) {
        commit("setCollectBlueFox")
    },
    setBlueFoxLockShow({ commit }, param) {
        commit("setBlueFoxLockShow", param)
    },
    setBlueFoxCaseShow({ commit }, param) {
        commit("setBlueFoxCaseShow", param)
    },
    setBlueFoxCaseIcon({ commit }, param) {
        commit("setBlueFoxCaseIcon", param)
    }
};
export default {
    namespaced: true,//用于在全局引用此文件里的方法时标识这一个的文件名
    state,
    getters,
    mutations,
    actions
}